﻿using BCEntity.MakeStaticPagingComponent.SystemServiceListing;
using System;
using System.Collections.Generic;
using System.Text;

namespace BCData.MakeStaticPagingComponent.SystemServiceListing
{
    /// <summary>
    /// 系统服务列表数据处理接口
    /// </summary>
    public interface ISystemServiceListingData
    {
        /// <summary>
        /// 检查系统服务列表信息是否存在
        /// </summary>
        /// <param name="websiteTemplateId">网站模板Id</param>
        /// <param name="displayName">服务展示名称</param>
        /// <returns></returns>
        bool CheckSystemServiceListingExists(int websiteTemplateId, string displayName);
        /// <summary>
        /// 检查系统服务列表信息是否存在
        /// </summary>
        /// <param name="systemServiceListingId">系统服务列表Id</param>
        /// <returns></returns>
        bool CheckSystemServiceListingExists(int systemServiceListingId);
        /// <summary>
        /// 获取系统服务列表信息
        /// </summary>
        /// <param name="systemServiceListingId">系统服务列表信息Id</param>
        /// <returns></returns>
        SystemServiceListingEntity Get(int systemServiceListingId);
        /// <summary>
        /// 获取系统服务列表信息
        /// </summary>
        /// <param name="websiteTemplateId">网站模板Id</param>
        /// <param name="displayName">服务展示名称</param>
        /// <returns></returns>
        SystemServiceListingEntity Get(int websiteTemplateId, string displayName);
        /// <summary>
        /// 获取系统服务列表信息
        /// </summary>
        /// <param name="methodName">服务展示名称</param>
        /// <returns></returns>
        SystemServiceListingEntity Get(string methodName);
        /// <summary>
        /// 获取系统服务列表
        /// </summary>
        /// <param name="websiteTemplateId">网站模板Id</param>
        /// <returns></returns>
        IEnumerable<SystemServiceListingEntity> Query(int websiteTemplateId);
        /// <summary>
        /// 获取系统服务列表
        /// </summary>
        /// <param name="websiteTemplateId">网站模板Id</param>
        /// <param name="displayName">服务展示名称</param>
        /// <param name="dataCount">数据总条数</param>
        /// <param name="ascending">排序</param>
        /// <param name="index">当前页码</param>
        /// <param name="size">每页数据条数</param>
        /// <returns></returns>
        IEnumerable<SystemServiceListingEntity> Query(int websiteTemplateId,string displayName, out int dataCount, bool? ascending, int index = 1, int size = 20);
        /// <summary>
        /// 添加系统服务列表信息
        /// </summary>
        /// <param name="systemServiceListingEntity">系统服务列表信息</param>
        /// <returns></returns>
        SystemServiceListingEntity Add(SystemServiceListingEntity systemServiceListingEntity);
        /// <summary>
        /// 更新系统服务列表信息
        /// </summary>
        /// <param name="systemServiceListingEntity">系统服务列表信息</param>
        /// <returns></returns>
        SystemServiceListingEntity Update(SystemServiceListingEntity systemServiceListingEntity);
        /// <summary>
        /// 删除系统服务列表信息
        /// </summary>
        /// <param name="systemServiceListingId">系统服务列表Id</param>
        void Delete(int systemServiceListingId);
    }
}
